Component({
  data: {
    active: 0,
  },

  methods: {
    onChange(event) {
      const index = event.detail;
      this.setData({ active: index });

      const pages = [
        "pages/student/profile/profile",
        "pages/student/transcript/transcript",
        "pages/student/research/research",
        "pages/student/application/application",
      ];

      wx.switchTab({
        url: `/${pages[index]}`,
      });
    },
  },
});

